<?php
/**
 * Notes:
 * User: wudg <544038230@qq.com>
 * Date: 2025/7/15 16:22
 */

namespace App\Controller\Sys;


use App\Controller\ApiController;
use App\Exception\ServiceException;
use App\Service\System\UploadOssQiNiuService;
use Hyperf\Di\Annotation\Inject;

class ToolsController extends ApiController
{

    #[Inject]
    protected UploadOssQiNiuService $uploadOssQiNiuService;

    /**
     * 附件本地上传
     * @return \Psr\Http\Message\ResponseInterface
     */
    public function uploadFile()
    {
        $savePath = $this->uploadOssQiNiuService->uploadFile($this->request);

        return $this->responseOk(['url'=>$savePath]);
    }

}